<template>
	<div>
		<JTMenu></JTMenu>
		 <div id="big_job_contain">
            <div class="big_jobcontain1">
                <div class="pos_top">
                	<div class="pos_t pos_t_one">我的位置：职位模板</div>
                </div>
                
                <div class="div_card">
	               	<Card :bordered="false" class="con_card" >
	               		<div>
	               			<i-button type="primary" style="width: 100px;" @click="AddSaveClick">新增模板</i-button>
	               			<span>共1条</span>
	               		</div>
	               		<Table border :columns="columns12" :data="data6" style="margin-top: 15px;">
					        <template slot-scope="{ row }" slot="name">
					            <strong>{{ row.name }}</strong>
					        </template>
					        <template slot-scope="{ row, index }" slot="action">
					            <Button type="primary" size="small" style="margin-right: 5px" @click="show(index)">修改</Button>
					            <Button type="primary" size="small" style="margin-right: 5px" @click="copy(index)">复制</Button>
					            <Button type="error" size="small" @click="remove(index)">删除</Button>
					        </template>
					    </Table>
                    </Card>
                </div>    
            </div>
        </div>    
        <Modal v-model="remove_tem" title="输入公司福利" @on-ok="ok" @on-cancel="cancel">
		       <p>是否删除!</p>
		</Modal>
	</div>
</template>
<script>
	import JTMenu         from     './components/Menu'
	
	export default {
    	name: 'JobTemplate',
    	components: {
    	    JTMenu
		},
		data () {
             return {
             	remove_tem:false,
                columns12: [
                    {
                        title: '模板名称',
                        slot: 'name',
                        width: 250,
                        align: 'center'
                    },
                    {
                        title: '职位名称',
                        key: 'position_name',
                        align: 'center'
                    },
                    {
                        title: '发布城市',
                        key: 'release_city',
                        align: 'center'
                    },
                    {
                        title: '创建时间',
                        key: 'creat_time',
                        align: 'center'
                    },
                    {
                        title: '创建用户',
                        key: 'creat_user',
                        align: 'center'
                    },
                    {
                        title: '操作',
                        slot: 'action',
                        width: 200,
                        align: 'center'
                    }
                ],
                data6: [
                    {
                        name: '小马哥',
                        position_name: "打酱油的吗?",
                        release_city: '那曲',
                        creat_time:"2019-10-26",
                      	creat_user:"马照法"
                    },
                    {
                        name: '小马哥',
                        position_name: "打酱油的吗?",
                        release_city: '那曲',
                        creat_time:"2019-10-26",
                        creat_user:"马照法"
                    },
                    {
                        name: '小马哥',
                        position_name: "打酱油的吗?",
                        release_city: '那曲',
                        creat_time:"2019-10-26",
                        creat_user:"马照法"
                    }
                ]
            }
        },
        methods: {
        	AddSaveClick(){
        		this.$router.push("/template")
        	},
            show (index) {
               this.$router.push("/template")
            },
            copy(index) {
                this.$router.push("/template")
            },
            remove (index) {
            	this.remove_tem = true
                /*this.data6.splice(index, 1);*/
            },
            ok () {
        		this.remove_tem = false
        		 this.$Message.info('Clicked ok');
            },
            cancel () {
               this.remove_tem = false
            }
        }
	}	
</script>

<style>
	#big_job_contain{
		width: 100%;
		height: 1200px;
		background: #F4F4F4;
	}
	.big_jobcontain1{
		width: 1000px;
		position: relative;
		left: 50%;
		margin-left: -500px;
		top: 15px;
	}
	.pos_t_one_span{
		color: red;
		font-weight: 700;
	}
	.pos_t_one_buy,.pos_t_one_say{
		color: #2DB7F5;
	}
	.pos_t_one_buy:hover{
		text-decoration: underline;
		cursor: pointer;
	}
	.pos_t_one_say:hover{
		text-decoration: underline;
		cursor: pointer;
	}
	.div_card{
		width: 1000px;
		margin-top: 10px;
		border-top: 2px;
	}
	.con_card{
		border-top: 4px solid #2DB7F5;
	}
</style>